package com.lz.reflect;

import java.util.Arrays;

/**
 * <pre>
 * @描述：
 * @作者：lizhao
 * @创建时间： 2024/9/26 上午10:52
 * </pre>
 **/
public class reflectUtils {
    public static void printAll(Class clazz) {
        Arrays.asList(clazz.getDeclaredFields()).forEach(field -> System.out.println(field.getName() + " " + field.getType()));
        Arrays.asList(clazz.getMethods()).forEach(method -> System.out.println(method.getName() + " " + Arrays.toString(method.getParameterTypes())));
        Arrays.asList(clazz.getConstructors()).forEach(constructor -> System.out.println(constructor.getName() + " " + Arrays.toString(constructor.getParameterTypes())));
    }
}
